[Setup]
AppName=FileUploader
AppVersion=1.0
DefaultDirName={pf}\FileUploader
OutputDir=.\Output
OutputBaseFilename=FileUploader_Setup
SetupIconFile="D:\code\idea\upload\target\classes\image\FileUploader.ico"
Compression=lzma
SolidCompression=yes

[Files]
Source: "D:\code\java\jdk8\zulu8.84.0.15-ca-jdk8.0.442-win_i686\jre\*"; DestDir: "{app}\jre"; Flags: recursesubdirs createallsubdirs
Source: "D:\code\idea\upload\target\classes\config\*"; DestDir: "{app}\config"; Flags: ignoreversion
Source: "D:\code\idea\upload\target\classes\image\*"; DestDir: "{app}\image"; Flags: ignoreversion
Source: "D:\code\idea\upload\target\upload-0.0.1-SNAPSHOT.jar"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\code\idea\upload\src\main\resources\pub\start_service.bat"; DestDir: "{app}"; Flags: ignoreversion

[Run]
Filename: "{app}\start_service.bat"; Parameters: ""; Description: "Run Application"; Flags: nowait postinstall skipifsilent

[Tasks]
Name: "autostart"; Description: "设置开机自启动"; GroupDescription: "附加任务"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"

[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "FileUploader"; ValueData: "{app}\start_service.bat"; Flags: uninsdeletekey; Tasks: autostart

[Icons]
Name: "{group}\FileUploader"; Filename: "{app}\start_service.bat"; WorkingDir: "{app}"; IconFilename: "{app}\image\FileUploader.ico"
Name: "{commondesktop}\FileUploader"; Filename: "{app}\start_service.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: "{app}\image\FileUploader.ico"